from django.shortcuts import render
from django.shortcuts import HttpResponse
from  cmdb import models

# Create your views here.
def index(request):
    #return HttpResponse("hello world")
    if request.method== "GET":
        param = request.GET.get('param')
        print(param)
        models.UserInfo.objects.create(user=param,pwd='pp')
        user_list=models.UserInfo.objects.all()
        return  render(request, "index.html", {"data":user_list})